import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import 'lib-flexible/flexible'
import 'lib-flexible'
import store from './store/index'
// vant注册
import Vant from 'vant';
import 'vant/lib/index.css';
import { Lazyload,Dialog } from 'vant';
import loadingGif from './assets/images/Loading.gif'
import imgErr from './assets/images/ImgErr.png'
Vue.use(Lazyload,{
  loading: loadingGif,
  error: imgErr
});
Vue.use(Vant).use(Dialog)
// 全局方法
import GFN from './utils/GFN'
Vue.prototype.GFN = GFN
// 工具类
import utils from './utils/utils'
Vue.prototype.utils = utils
import './http/config'
// 注册全局组件
import components from './utils/components'
Vue.use(components)
//全局过滤器
import * as filters from './utils/filter'
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
// 指令
import './utils/directive'
Vue.config.productionTip = false
// 终端调试器 上线请把它注释掉
// import './utils/vconsole'
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
